
package sintelo.metaparsers.lexico;


import sintelo.reconhecedor.sintatico.EspecificacaoSintatica;


public class DadosSintatico implements EspecificacaoSintatica {


    private static final int[][] TABELA_PARSE = {
        {1, -1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0},
        {-1, -1, 4, -1, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4},
        {3, -1, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
        {-1, -1, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7},
        {-1, 8, -1, 8, 8, -1, -1, -1, 8, -1, 8, -1, -1, -1, -1, -1, -1, -1, -1},
        {-1, 11, -1, 11, 11, -1, -1, -1, 11, -1, 11, -1, -1, -1, -1, -1, -1, -1, -1},
        {9, -1, -1, -1, -1, 9, -1, 10, -1, -1, -1, 9, -1, -1, -1, -1, -1, -1, -1},
        {-1, 14, -1, 14, 14, -1, -1, -1, 14, -1, 14, -1, -1, -1, -1, -1, -1, -1, -1},
        {12, 13, -1, 13, 13, 12, -1, 12, 13, -1, 13, 12, -1, -1, -1, -1, -1, -1, -1},
        {-1, 17, -1, 15, 16, -1, -1, -1, 19, -1, 18, -1, -1, -1, -1, -1, -1, -1, -1},
        {23, 23, -1, 23, 23, 23, -1, 23, 23, -1, 23, 23, -1, -1, 20, 21, 22, -1, -1},
        {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 24, -1, -1, -1, -1, -1, -1, -1, -1},
        {-1, -1, -1, -1, -1, -1, -1, -1, 25, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
        {-1, 27, -1, 27, -1, -1, -1, -1, -1, -1, -1, -1, 26, -1, -1, -1, -1, -1, -1},
        {-1, 28, -1, 28, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
        {-1, 30, -1, 29, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
        {-1, 31, -1, 31, -1, -1, -1, -1, -1, 31, -1, -1, -1, 32, -1, -1, -1, -1, -1},
        {-1, 33, -1, 33, -1, -1, -1, -1, -1, 34, -1, -1, -1, -1, -1, -1, -1, -1, -1},
        {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 35, -1, -1, -1, -1, -1}
    };


    private static final int[][] PRODUCOES = {
        {20, 57, 21, 58},
        {58},
        {5, 20, 57, 21},
        {},
        {22, 23},
        {4, 49},
        {2, 39},
        {18, 38},
        {24, 25},
        {},
        {7, 40, 24, 25},
        {26, 27},
        {},
        {26, 27},
        {28, 29},
        {3, 41},
        {4, 42},
        {1, 43},
        {30},
        {31},
        {14, 44},
        {15, 45},
        {16, 46},
        {},
        {10, 47, 23, 11, 48},
        {8, 50, 32, 33, 9, 51},
        {12, 52},
        {},
        {34, 56, 35},
        {3, 53},
        {1, 54},
        {36},
        {37},
        {33},
        {},
        {13, 34, 55, 36}
    };


    public int getDerivacao(int s, int t) {
        return TABELA_PARSE[s][t];
    }


    public int[] getProducao(int n) {
        return PRODUCOES[n];
    }


    public int getPrimeiroNaoTerminal() {
        return 19;
    }


    public int getPrimeiraAcao() {
        return 38;
    }


    public int getSimboloInicial() {
        return 19;
    }
}
